<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');

//前台首页控制器
class Home extends Home_Controller{

	public function __construct(){
		parent::__construct();
		$this->load->model('category_model');
		$this->load->model('goods_model');
        $this->load->model('adv_model');
	}

	public function index(){

        //$this->output->enable_profiler(TRUE);
		$data['cates'] = $this->category_model->front_cate();

		$data['best_goods'] = $this->goods_model->best_goods();

        //广告
        $data['advs'] = $this->adv_model->list_adv();

        //下下级菜单了


        #载入多个视图
        $this->load->view('public/header.html',$data);
        $this->load->view('public/index-menu.html');
        $this->load->view('index.html');

	}
}